Press enter to skip the top menu

Scalable Vector Graphics

Introduction

Scalable Vector Graphics, hereafter referred to as SVG, is the least familiar components of web development. Its better knows siblings are HyperText Markup Language or HTML, Cascading Style Sheets or CSS and JavaScript

SVG can be used to create illustrations for a web page in exactly the same way that photographic images such as .JPG and .PNG are used. In some ways SVG images have some advantages over their photographic counterparts. These advantages are:

These two advantages should make it worth our while to becme familiar with this product.

Go to top

A brief History

The World Wide Web consortium began development of SVG in 1999 and Version 1 appeared in 2001. Further develpment occurred and the first draft of the second version appeared in 2018. The most recent draft was released in 2023.

Go to top

Features of SVG

SVG supports interactivity, animation and three types of graphical objects:

It can be styled using CSS and can use CSS for scripting. It can also be embedded in HTML. We shall give a brief description of each.

Path

A path is a compound shape drawn with straight lines and curves. It can be a shape in its own righ or can be used for clipping

Standard Shapes

These include the following:


Colours

Colours can be applied to all of the shapes mentioned above. SVG can use the rgb and rgba systems as well as the same colour constants that HTML recognises.


Clipping

This involves using a shape or combination of shapes to provide new outlines for other shapes. Yes, it is easier to work on an example of clipping than actually discussing it.


Interactivity

SVG images can respond to user's in many ways. This includes clicking or hovering with the mouse, getting or losing focus and keyboard keys.


Animation

SVG has inbuilt elements to control animation. This can be enhanced using JavaScript.

Revision

Multi Choice

Fill in the blanks

Go to top

Assignment

Explain what SVG files are and how they differ from traditional photographic images like.JPG or.PNG. Highlight the key advantages of SVG, particularly in terms of file size and scalability.

Describe the main features of SVG, including the types of graphic elements it supports and its capabilities regarding styling, scripting, and embedding. Briefly explain the concept of clipping in SVG and its purpose.

Discuss how interactivity is implemented in SVG, mentioning the various user actions that SVG images can respond to. Outline the animation capabilities of SVG, including how it handles animation intrinsically and how it can be further enhanced.

Provide a concise overview of the history of SVG, including its origins and the key milestones in its development. Explain why SVG is considered an important component of modern web development, despite being less familiar than HTML, CSS, or JavaScript.